#include <stdio.h>
#include <math.h>
#include <time.h>
int main()
{
int a[100];
double b[100];
int i,j;
int max1=0,min1=a[0],sum1=0;
double max2=0.00,min2=b[0],sum2=0.00;
double ave1,ave2;
  srand((unsigned)time(NULL));
    for(i=0;i<100;i++)
{     
a[i]=rand()%100;

if(a[i]!=0)
    
        b[i]=1.0/a[i];
      else 
       b[i]=0;
sum1+=a[i];
sum2+=b[i];
      if(max1<a[i])
       max1=a[i];
      else
       if(max2<b[i])
      max2=b[i];
      else
       if(min1>a[i])
       min1=a[i];
      else
      if(min2>b[i])
     min2=b[i];
     
}
ave1=sum1/100.0;
ave2=sum2/100.0;
for(j=0;j<100;j++)
{
printf("%d %d %.2f\n",j+1,a[j],b[j]);
}
printf("max %d %.2f\n",max1,max2);
printf("min %d %.2f\n",min1,min2);
printf("ave %.1f %.2f\n",ave1,ave2);
return 0;
}
